<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script language="javascript">
var weburl="{yun:}$config.sy_weburl{/yun}";
function checkform(myform){
	if ($("#title").val()==""){
		parent.layer.msg('请填写域名备注！', 2, 8);
     	return (false);
  	}
	if($("#domain").val()==""){
		parent.layer.msg('请填写需绑定的域名！', 2, 8);
		return (false);
	}
    if ($("#province").val()=="" && $("#hy").val()==""){
	  parent.layer.msg('城市和行业最少选择一项！', 2, 8);
      return (false);
  	}
	$("#domainform").submit();
}
</script>
<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet">
<title>后台管理</title>
</head>
<body class="body_ifm">
<div class="infoboxp"> 
<div class="admin_new_tip">
<a href="javascript:;" class="admin_new_tip_close"></a>
<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
<div class="admin_new_tip_list_cont">
<div class="admin_new_tip_list">同一域名不得绑定多个城市，多个域名可以绑定同一城市，但是前台选择城市域名跳转会以最后添加域名为基准，外部访问则不作限制！</div>
<div class="admin_new_tip_list">域名绑定不支持2级目录 如 http://localhost/phpyun 本地环境测试请解析域名</div>
<div class="admin_new_tip_list"><a href='http://www.phpyun.com/bbs/thread-4218-1-1.html' target="_blank">点击查看教程</a></div>
</div>
</div>
<div class="clear"></div>


<div class="tag_box mt10">
<iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
<form id="domainform" target="supportiframe" name="myform" action="index.php?m=admin_domain&c=save" method="post" encType="multipart/form-data" class="layui-form">
	<table width="100%" class="table_form">
   <tbody>
  <tr class="admin_table_trbg">
    <th width="160" bgcolor="#f0f6fb"><span class="admin_bold">参数说明</span></th>
    <td bgcolor="#f0f6fb"><span class="admin_bold">参数值</span></td>   
  </tr>
 </tbody>
    	<tr >
			<th>域名备注：</th>
			<td><input class="input-text" type="text" id="title" name="title" size="40" value="{yun:}$site.title{/yun}"/><span class="admin_web_tip">如：北京站</span></td>
		</tr>
		<tr class="admin_table_trbg" >
			<th>绑定域名：</th>
			<td><input class="input-text" type="text" id="domain" name="domain" size="40" value="{yun:}$site.domain{/yun}"/><span class="admin_web_tip">如：beijing.hr135.com(不带http://)</span></td>
		</tr>
		<tr>
			<th>分站类型：</th>
			<td>
        <div class="layui-form-item">
          <div class="layui-input-inline">
            <select name="fz_type" lay-filter="fz_type">
              <option value="">请选择</option>
              <option value="1" {yun:}if $site.fz_type==1{/yun} selected{yun:}/if{/yun}>地区分站</option>
              <option value="2" {yun:}if $site.fz_type==2{/yun} selected{yun:}/if{/yun}>行业分站</option>
            </select>
          </div>
        </div>
      </td>
		</tr>
		<tr id='fz_type_1' {yun:}if '2'==$site.fz_type{/yun}style="display:none;"{yun:}/if{/yun}  class="admin_table_trbg">
			<th>地区分站：</th>
			<td>
        <div class="layui-form-item">
          <div class="layui-input-inline">
            <select id="province" name="provinceid" lay-filter="citys">
              <option value="">请选择</option>
              {yun:}foreach from=$city_index key=j item=v{/yun}
              <option value="{yun:}$v{/yun}" {yun:}if $site.province == $v{/yun} selected{yun:}/if{/yun}
                >{yun:}$city_name[$v]{/yun}
              </option>
              {yun:}/foreach{/yun}
            </select>
          </div>
          <div class="layui-input-inline">
            <select name="cityid" lay-filter="citys" id="cityid">
              <option value="">请选择</option>
              {yun:}foreach from=$city_type[$site.province] key=j item=v{/yun}
              <option value="{yun:}$v{/yun}" {yun:}if $site.cityid==$v{/yun} selected{yun:}/if{/yun}
                >{yun:}$city_name[$v]{/yun}
              </option>
              {yun:}/foreach{/yun}
            </select>
          </div>
          <div class="layui-input-inline">
            <select name="three_cityid" lay-filter="three_cityid" id="three_cityid">
              <option value="">请选择</option>
              {yun:}foreach from=$city_type[$site.cityid] key=j item=v{/yun}
              <option value="{yun:}$v{/yun}" {yun:}if $site.three_cityid==$v{/yun} selected{yun:}/if{/yun}
                >{yun:}$city_name[$v]{/yun}
              </option>
              {yun:}/foreach{/yun}
            </select>
          </div>
        </div>  
      </td>
		</tr>

		<tr id='fz_type_2' {yun:}if $site.fz_type!='2'{/yun}style="display:none;"{yun:}/if{/yun}  class="admin_table_trbg">
			<th>行业分站：</th>
			<td>
        <div class="layui-form-item">
          <div class="layui-input-inline">
            <select id="hy" name="hy" lay-filter="hy">
              <option value="">请选择</option>
              {yun:}foreach from=$industry_index key=j item=v{/yun}
              <option value="{yun:}$v{/yun}" {yun:}if $site.hy == $v{/yun} selected{yun:}/if{/yun}
                >{yun:}$industry_name[$v]{/yun}
              </option>
              {yun:}/foreach{/yun}
            </select>
          </div>
        </div>   
      </td>
		</tr>

   	<tr>
			<th>风格分站：</th>
			<td>
        <div class="layui-form-item">
          <div class="layui-input-inline">
            <select name="style">
              {yun:}foreach item=row from=$list{/yun}
              <option value="{yun:}$row.dir{/yun}" 
                {yun:}if $site.style == $row.dir{/yun} selected{yun:}/if{/yun}>{yun:}$row.dir{/yun}</option>
              {yun:}/foreach{/yun}
            </select>
          </div>
          <span class="admin_web_tip">
            选择您需要绑定的模板风格目录，绑定成功后通过该域名访问人才网会自动进入到该风格下
          </span>
        </div>
      </td>
		</tr>
    
    <tr class="admin_table_trbg">
			<th>首页模板：</th>
			<td><input class="input-text" type="text" name="tpl" size="40" value="{yun:}$site.tpl{/yun}"/><span class="admin_web_tip">如：index.htm(后缀是.htm 不填则是默认index.htm模板)</span></td>
		</tr>
         
    <tr >
			<th>是否启用该域名：</th>
			<td>
        <div class="layui-form-item">
          <div class="layui-input-inline">
            <input name="type_switch" lay-filter="type_switch" lay-skin="switch" lay-text="启用|停用"
             {yun:}if $site.type == "1"{/yun} checked{yun:}/if{/yun}
             type="checkbox">
            <input type="hidden" name="type" id="type" value="{yun:}$site.type{/yun}"/>
          </div>
          <span class="admin_web_tip">提示：停用该域名则不在前台选择城市处显示并且外部访问不对该域名进行解析</span>
        </div>
      </td>
		</tr>

    <tr class="admin_table_trbg">
		<th width="160">分站首页标题：</th>
		<td class="y-bg"><textarea name="webtitle" id="webtitle" rows="3" cols="50" class="text tips_class">{yun:}$site.webtitle{/yun}</textarea></td>
	</tr>

    <tr>
		<th width="160">分站首页关键词：</th>
		<td class="y-bg"><textarea name="webkeyword" id="webkeyword" rows="3" cols="50" class="text tips_class">{yun:}$site.webkeyword{/yun}</textarea></td>
	</tr>
	<tr class="admin_table_trbg">
		<th width="160">分站首页描述：</th>
		<td><textarea name="webmeta" id="webmeta" rows="3" cols="50" class="text">{yun:}$site.webmeta{/yun}</textarea></td>
	</tr>
    <tr> <th width="160">分站LOGO：</th>
		 <td>
			 <button type="button" class="yun_bth_pic adminupload" lay-data="{name: 'weblogo',imgid: 'imgicon'}">上传图片</button>
			<input type="hidden" id="layupload_type" value="2"/>
			<input type="hidden" id="upload_path" value="logo"/>
			<input type="hidden" name="weblogo" value="{yun:}$site.weblogo{/yun}"/>
			<img id="imgicon" src="{yun:}$config.sy_weburl{/yun}/{yun:}$site.weblogo{/yun}" style="max-width:300px;_width:300px" {yun:}if !$site.weblogo{/yun}class="none"{yun:}/if{/yun}>
			<span class="admin_web_tip">提示：默认为空则调用网站LOGO</span>
          </td>
		</tr>
		<tr class="admin_table_trbg" >
			<td align="center" colspan="2">
            <input type="hidden" name="pytoken" id='pytoken'value="{yun:}$pytoken{/yun}">
			{yun:}if is_array($site){/yun}
        	<input type="hidden" name="id" size="40" value="{yun:}$site.id{/yun}"/>
        	<input class="admin_button" type="button" onclick="checkform()" name="update" value="&nbsp;更 新&nbsp;"  />
        	{yun:}else{/yun}
    		<input class="admin_button" type="button" onclick="checkform()" value="&nbsp;添 加&nbsp;"  />
     		{yun:}/if{/yun}
     		<input class="admin_button" type="reset" name="reset" value="&nbsp;重 置 &nbsp;" />
			</td>
		</tr>
	</table>
</form>
</div>
</div>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
<script language=javascript src='{yun:}$config.sy_weburl{/yun}/data/plus/city.cache.js?v={yun:}$config.cachecode{/yun}'>
</script>
<script language=javascript src='{yun:}$config.sy_weburl{/yun}/js/city.js?v={yun:}$config.cachecode{/yun}'>
</script>
<script type="text/javascript">
var weburl = '{yun:}$config.sy_weburl{/yun}';
  layui.use(['form'], function(){
    var form = layui.form
      ,$ = layui.$;  

    form.on('select(fz_type)', function(data){
      if(data.value == 1){
        $("#fz_type_1").show();
        $("#fz_type_2").hide();
      }else{
        $("#fz_type_2").show();
        $("#fz_type_1").hide();
      }
    });

    form.on('switch(type_switch)', function(data){
      var v = this.checked ? 1 : 2;
      $("#type").val(v);
    });

  });//end layui.use()

</script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui.upload.js?v={yun:}$config.cachecode{/yun}" type='text/javascript'></script>
</body>
</html>